create proc [dbo].[spLayNguyenLieuCTKhoLoaiNL] (@maKho int,@maLoaiNL int)
as
begin
	select ChiTietKho.MaNL, TenNL, TenNCC, TenLoaiNL, TenDVTinh
	from NguyenLieu,LoaiNguyenLieu,DonViTinh,ChiTietKho,NhaCungCap
	where NguyenLieu.MaNCC = NhaCungCap. MaNCC and
			NguyenLieu.MaLoaiNL = LoaiNguyenLieu.MaLoaiNL and
			NguyenLieu.MaDVTinh = DonViTinh. MaDVTinh and ChiTietKho.MaNL = NguyenLieu.MaNL
			and NguyenLieu.MaLoaiNL = @maLoaiNL and ChiTietKho.MaKho = @maKho
end